﻿using System.ComponentModel;
using System.Data;
using System.Web.Services;

namespace Fjaspx.WebService
{
    /// <summary>
    /// ROYcms_news 的摘要说明
    /// </summary>
    [WebService(Namespace = "Fjaspx.WebService.ROYcms_Information")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [ToolboxItem(false)]
    public class ROYcms_Information : System.Web.Services.WebService
    {
        private readonly Fjaspx.Sys.Bll.ROYcms_news Bll = new Fjaspx.Sys.Bll.ROYcms_news();

        
        #region  成员方法
        
        /// <summary>
        /// 自定义SQL语句返回DATESET
        /// </summary>
        public DataSet GetDataSet(string SQL)
        {
            return Bll.GetDataSet(SQL);
        }
        /// <summary>
        /// 获得前几行数据
        /// </summary>
        [WebMethod]
        public DataSet _GetList(int Top, string strWhere, string filedOrder)
        {
            return Bll.GetList(Top, strWhere, filedOrder);
        }
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        [WebMethod]
        public bool Exists(int bh)
        {
            return Bll.Exists(bh);
        }
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(Fjaspx.Sys.Model.ROYcms_news model)
        {
            return Bll.Add(model);
        }
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public void Update(Fjaspx.Sys.Model.ROYcms_news model)
        {
            Bll.Update(model);
        }

        /// <summary>
        /// 删除一条数据
        /// </summary>
        public void Delete(int bh)
        {
            Bll.Delete(bh);
        }
        /// <summary>
        /// 修改一条数据是否置顶
        /// </summary>
        public void Ding_news(int bh, int ding)
        {
            Bll.Ding_news(bh, ding);
        }
        /// <summary>
        /// 修改一条数据是否推荐
        /// </summary>
        public void Tuijian_news(int bh, int tuijian)
        {
            Bll.Tuijian_news(bh, tuijian);
        }
        /// <summary>
        /// 控制开关 打开 和关闭一条数据
        /// </summary>
        public void K_news(int bh, int switchs)
        {

            Bll.K_news(bh, switchs);
        }
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        [WebMethod]
        public Fjaspx.Sys.Model.ROYcms_news GetModel(int bh)
        {

            return Bll.GetModel(bh);
        }

        /// <summary>
        /// 获得数据列表
        /// </summary>
        [WebMethod]
        public DataSet GetList(string strWhere)
        {
            return Bll.GetList(strWhere);
        }
        /// <summary>
        /// 获得数据列表 SQL语句地定义
        /// </summary>
        public DataSet GetList_(string strSql)
        {
            return Bll.GetList_(strSql);
        }
        /// <summary>
        /// 获得数据总数
        /// </summary>
        [WebMethod]
        public int GetCount(string strWhere)
        {
            return Bll.GetCount(strWhere);
        }


        #endregion  成员方法
    }
}
